package com.example.service.impl;

import com.example.domain.User;
import com.example.service.IUserService;

import javax.inject.Named;
import javax.ws.rs.*;
import javax.ws.rs.core.MediaType;

@Named
public class UserServiceImpl implements IUserService {

    @GET
    @Path("/{userId}")
    @Produces({MediaType.APPLICATION_XML,MediaType.APPLICATION_JSON})
    @Override
    public User selectUserInfo(@PathParam("userId") Long userId,@QueryParam("name") String name) {
        return new User(userId, name, "JiangXi");
    }
}
